﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Kovan.DAL.Config;
using Kovan.Model.Parameter.Config;
using Kovan.Model.ViewModel.Config;

namespace Kovan.BLL.Config
{
    public class BNewsManage
    {
        DNewsManage dal = new DNewsManage();
        #region 当前类的实例.
        private static readonly BNewsManage Instances = new BNewsManage();

        private BNewsManage() { }

        public static BNewsManage GetInstances()
        {
            return Instances;
        }
        #endregion

        public IEnumerable<ENews> GetNewsItems(PNews param)
        {
            return dal.GetNewsItems(param);
        }

        public ENews GetNewsItem(long id)
        {
            return dal.GetNewsItem(id);
        }

        ///// <summary>
        ///// 添加
        ///// </summary>
        ///// <param name="model"></param>
        ///// <returns></returns>
        //public int Add(ENews model)
        //{
        //    return dal.Add(model);
        //}

        /// <summary>
        /// 更新
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public int Update(ENews model)
        {
            return dal.Update(model);
        }
    }
}
